﻿@using PopForums.Models;
@model Dictionary<UserImage, User>
@{
	ViewBag.PageTitle = PopForums.Resources.UserImageApproval;
    Layout = "~/Areas/PopForums/Views/Admin/AdminMaster.cshtml";
}

<h1>@PopForums.Resources.UserImageApproval</h1>

@if ((bool)ViewBag.IsNewUserImageApproved)
{
	<p class="warning">@PopForums.Resources.UserImageApprovalNotReq</p>
}

@foreach (var item in Model)
{
	<p>
		@item.Value.Name | <a href="mailto:@item.Value.Email">@item.Value.Email</a><br />
		<img src="@Url.Action("UserImage", "Image", new {id = item.Key.UserImageID})" alt="User image" /><br />
		@using (Html.BeginForm("ApproveUserImage", "Admin", new { id = item.Key.UserImageID }, FormMethod.Post, new { style = "display: inline;" })) { <input type="submit" value="Approve" /> }
		@using (Html.BeginForm("DeleteUserImage", "Admin", new { id = item.Key.UserImageID }, FormMethod.Post, new { style = "display: inline;" }))
  { <input type="submit" value="@PopForums.Resources.Delete" /> }
	</p>
	<hr />
}